package uuu;

public class Payload {





    private int weight;
    public Payload(int wt) {
        weight = wt;
    }
    public Payload() {}
    public void setWeight(int w) {
        weight = w;
    }
    public String toString() {
        return Integer.toString(weight);
    }


    static void changePayload(Payload p) {



        p.setWeight(420);




    }
    public static void main(String[] args) {
        Payload p = new Payload();
        p.setWeight(1024);
        changePayload(p);
        System.out.println("The value of p is " + p);
    }
}




